//
//  YWRoundImageView.m
//  maintain
//
//  Created by 郑想 on 15/12/23.
//  Copyright © 2015年 ewin. All rights reserved.
//

#import "YWRoundImageView.h"
@interface YWRoundImageView ()
@property (nonatomic, weak) UIImageView* shadeView;
@end

@implementation YWRoundImageView

+ (instancetype)roundImageView
{
    return [[self alloc] init];
}

-(UIImageView*)shadeView
{
    if (!_shadeView) {
        UIImageView* shadeView = [[UIImageView alloc]init];
        shadeView.image = [UIImage imageNamed:@"roundImage_shade"];
        [self addSubview:shadeView];
        _shadeView = shadeView;
    }
    return _shadeView;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.shadeView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}
    @end
